package com.rede.didiok.admin.entity;

import java.util.List;

import lombok.Data;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.rede.didiok.common.entity.SuperEntity;

/**
 * 
 * 
 * @author Rede
 * @email didiok@foxmail.com
 * @date 2023-08-07 18:21:16
 */
@Data
@TableName("a_web_navbar")
public class WebNavbarEntity extends SuperEntity<WebNavbarEntity> implements Comparable<WebNavbarEntity>  {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	private String name;
	/**
	 * 
	 */
	private Integer navbarLevel;
	/**
	 * 
	 */
	private String summary;
	/**
	 * 
	 */
	private String parentUid;
	/**
	 * 
	 */
	private String url;
	/**
	 * 
	 */
	private String icon;
	/**
	 * 
	 */
	private Integer isShow;
	/**
	 * 
	 */
	private Integer isJumpExternalUrl;
	/**
	 * 
	 */
	private Integer sort;

	// 以下字段在数据库中不存在


	/**
	 * 父菜单
	 */
	@TableField(exist = false)
	private WebNavbarEntity parentWebNavbar;

	/**
	 * 子菜单
	 */
	@TableField(exist = false)
	private List<WebNavbarEntity> childWebNavbar;

	@Override
	public int compareTo(WebNavbarEntity o) {

		if (this.sort >= o.getSort()) {
			return -1;
		}
		return 1;
	}


}
